package com.holic.spring.custom.holder;

/**
 * @ClassName DataHolder
 * @Description
 * @Author Neil
 * @Date 2024/11/13 17:05
 * @Version V1.0
 **/
public final class DataHolder {

    private static ThreadLocal<Object> data = new ThreadLocal<>();

    public static void set(Object data) {
        DataHolder.data.set(data);
    }

    public static Object get() {
        return DataHolder.data.get();
    }

    public static void remove() {
        DataHolder.data.remove();
    }

}
